package root.electronclass.electronclass.home.widget;// PageMarginItemDecoration.java
import android.graphics.Rect;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

public class PageMarginItemDecoration extends RecyclerView.ItemDecoration {
    private final int pageMargin;

    public PageMarginItemDecoration(int pageMargin) {
        this.pageMargin = pageMargin;
    }

    @Override
    public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, 
                               @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
        outRect.right = pageMargin;
    }
}